# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header

inherit eutils


DESCRIPTION="reacTIVision is an open source, cross-platform computer vision framework for the fast and robust tracking of fiducial markers in a real-time video stream."
HOMEPAGE="http://www.iua.upf.es/mtg/reactable/?software"
MY_PN="reacTIVision"
MY_P=${MY_PN}-${PV}
SRC_URI="mirror://sourceforge/${PN}/${MY_P}-src.zip
		http://www.iua.upf.es/mtg/reactable/pdfs/fiducials.pdf
		mirror://sourceforge/reactivision/TUIO_CPP-${PV}.zip
		"
S=${WORKDIR}/${MY_P}
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~ppc ~amd64"
IUSE=""
DEPEND=">=media-libs/libsdl-1.2.9
		>=media-libs/libdc1394-1.0.0
		>=sys-libs/libraw1394-1.2.0"

src_compile() {
	cd linux
	emake || die "make failed."
	cd ${WORKDIR}/TUIO_CPP
	emake || die "make failed."
}

src_install() {
	dodir /usr/bin
	dodir /usr/share/doc/${P}
	cd linux
	make DESTDIR=${D}usr install || die "install failed."
	mv ${D}usr/${MY_PN} ${D}usr/bin/${PN}
	cp ${DISTDIR}/fiducials.pdf ${D}usr/share/${MY_PN}
	mv ${D}usr/share/${MY_PN}/*txt ${D}usr/share/doc/${P}
	cd ${WORKDIR}/TUIO_CPP
	dobin TuioDemo TuioDump
}
